# include "effect.h"

namespace WuguiEngine
{
	namespace Graphics
	{
		void SimpleEffect::Initialize()
		{
			SetTechnique("SimpleTexture");
			SetTexture("diffuseTexture", pModel->GetDiffuseMap());
		}

		void SimpleEffect::SetParameters()
		{
			SetMatrix("world", pDevice->GetTransform(D3DTS_WORLD));
			SetMatrix("view", pDevice->GetTransform(D3DTS_VIEW));
			SetMatrix("projection", pDevice->GetTransform(D3DTS_PROJECTION));
		}

		SimpleEffect::SimpleEffect(GraphicsDevice* device, 
			Model* _model, string filename) : BaseEffect(device, filename)
		{
			pModel = _model;
		}

		void SimpleEffect::Dispose()
		{
			this->BaseEffect::Dispose();
		}
	}
}